package com.barneyx.mshinfoplatform.entity.area;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.barneyx.mshinfoplatform.entity.CommonEntity;
import com.gitee.sunchenbin.mybatis.actable.annotation.Column;
import com.gitee.sunchenbin.mybatis.actable.annotation.TableCharset;
import com.gitee.sunchenbin.mybatis.actable.constants.MySqlCharsetConstant;
import com.gitee.sunchenbin.mybatis.actable.constants.MySqlTypeConstant;
import io.swagger.annotations.ApiModel;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

@TableName("msh_area")
@Data
@AllArgsConstructor
@NoArgsConstructor
@ApiModel("区域表")
@TableCharset(MySqlCharsetConstant.UTF8MB4)
public class AreaEntity extends CommonEntity {
    @TableId(value = "area_id", type = IdType.ASSIGN_ID)
    @Column(type = MySqlTypeConstant.BIGINT)
    private String AreaId;

    @TableField("area_parent_id")
    @Column(type = MySqlTypeConstant.BIGINT, defaultValue = "0")
    private String AreaParentId;

    @TableField("area_name")
    private String AreaName;

    @TableField("area_nickname")
    private String AreaNickName;



    @TableField("area_pointer")
    private String AreaPointer;

    @TableField("area_show")
    @Column(type = MySqlTypeConstant.BINARY, defaultValue = "0")
    private Boolean areaShow;

    @TableField("area_default")
    @Column(type = MySqlTypeConstant.TINYINT, defaultValue = "0", comment = "在没有检测到区域时,系统默认选择的区域")
    private Boolean AreaDefault;

    @TableField(exist = false)
    private boolean DefaultArea;

    @TableField(exist = false)
    private AreaEntity ParentAreaInfo;
}
